using System;
using System.Collections.Generic;
using System.Text;

namespace Survive.Library
{
    public class Model : IModel
    {
        Dictionary<int, Space> spaces = new Dictionary<int, Space>();

        internal Model()
        {
        }

        internal Space AddOrGetSpace(int spaceId)
        {
            Space space;

            if (!spaces.TryGetValue(spaceId, out space))
            {
                space = new Space(spaceId);
                spaces.Add(spaceId, space);
            }

            return space;
        }
    }
}
